package com.mzy.javaapi.generalApi;

import org.testng.annotations.Test;

import java.util.ArrayList;

/**
 * @author Ives
 * * @date 2021/12/7
 */
public class ListAddList {

  /**
   * List集合类合并，JDK
   */

  @Test
  public void demo(){
    ArrayList<String> list1 = new ArrayList<>();
    ArrayList<String> list2 = new ArrayList<>();

    list1.add("a");
    list1.add("b");
    list2.add("a");
    list2.add("b");
    list1.addAll(list2);

    System.out.println(list1);
  }
}
